import os
ON_DEV = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev')

qsiauth = {
    # Login uri. The user will be returned here if an error occures.
    'login_uri': '/', # default 'login/'
    # The user is sent here after successfull authentication.
    'success_uri': '/',
    'secret_key': 'CHANGE_TO_A_SECRET_KEY',
	#2d2244478db36f74b23925049e847d2c4cabbe5a
    # Comment out the following lines to use default
    # User and UserProfile models.
    'user_model': 'models.CustomUser',
}

qsiauth['provider.google'] = {
    'client_id': '401835245685-8l1v02ngu95npa5nmfvd507j05kiforb.apps.googleusercontent.com',
    'client_secret': 'oiuW2o-_XeYPE8UiVBasA54n',
    'api_key': '',
    'scope': 'https://www.googleapis.com/auth/plus.me',
    }

qsiauth['provider.github'] = {
    'client_id': '158eb236b8296f1f1c8e',
    'client_secret': 'd00262f99ca6200200bd46e477935ac9a1beca7f',
    }

qsiauth['provider.linkedin'] = {
    'client_id': 'agm8yfmgxpiy',
    'client_secret': 'lxRl3FLupFkwSVmv',
    }



def webapp_add_wsgi_middleware(app):
    from qsiauth import middleware
    return middleware.AuthMiddleware(app)

